package com.example.widgetcase.slice.colorfilter;

import com.example.widgetcase.ResourceTable;
import com.example.widgetcase.slice.BaseSlice;
import ohos.aafwk.content.Intent;
import ohos.agp.components.Button;

public class ColorMainAbility extends BaseSlice {
    @Override
    public int getChildUIContent() {
        return ResourceTable.Layout_color_main;
    }

    @Override
    protected void onStart(Intent intent) {
        super.onStart(intent);

        Button matrixBtn = (Button) findComponentById(ResourceTable.Id_matrixBtn);
        Button hueBtn = (Button) findComponentById(ResourceTable.Id_hueBtn);
        matrixBtn.setClickedListener(component -> present(new ColorMatrixAbility(), new Intent().setParam("name", "ColorMatrix")));
        hueBtn.setClickedListener(component -> present(new ColorHueAbility(), new Intent().setParam("name", "ColorHue")));
    }
}
